package com.kamistoat.meimeimall.meimeimallpayment.dao;

import com.kamistoat.meimeimall.meimeimallpayment.entity.PaymentRecordEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface PaymentRecordDao {
    /**
     * 统计指定时间内的交易记录数
     */
    Long countBetweenTime(@Param("startTime") Date startTime, @Param("endTime") Date endTime);

    /**
     * 批量插入
     */
    Long insertBatch(@Param("paymentList") List<PaymentRecordEntity> paymentRecordEntityList);

    Long insert(@Param("payment") PaymentRecordEntity paymentRecordEntity);

    void logicDeleteByOrderSn(@Param("orderSn") String orderSn);
}
